`ifndef DTYPE_SVH
`define DTYPE_SVH
typedef struct packed {logic [31:0] dat;} hy32_t;

typedef struct packed {
    logic sign;
    logic [7:0] exp;
    logic [22:0] mant;
} fp32_t;

typedef struct packed {
    logic sign;
    logic [7:0] exp;
    logic [6:0] mant;
} bf16_t;

typedef struct packed {
    bf16_t dat;
    logic [15:0] rsv;
} bf16_e;

typedef struct packed {
    logic sign;
    logic [4:0] exp;
    logic [9:0] mant;
} fp16_t;

typedef struct packed {
    logic sign;
    logic [3:0] exp;
    logic [2:0] mant;
} e4m3_t;

typedef struct packed {
    logic sign;
    logic [4:0] exp;
    logic [1:0] mant;
} e5m2_t;

typedef logic [7:0] int8_t;
typedef logic [7:0] uint16_t;

typedef struct packed {int8_t [`P_ARU *2-1:0] dat;} arb_8B_t;

typedef union packed {
    e4m3_t [15:0] e4m3;
    e5m2_t [15:0] e5m2;
    int8_t [15:0] int8;
    fp16_t [7:0]  fp16;
    bf16_t [7:0]  bf16;
    fp32_t [3:0]  fp32;
} pack_16B_t;

typedef logic [39:0] gm_addr_t;
typedef logic [23:0] ub_addr_t;
typedef logic [15:0] lmb_addr_t;
typedef logic [15:0] rmb_addr_t;
typedef logic [15:0] pmb_addr_t;
typedef logic [23:0] psb_addr_t;
typedef logic [7:0] arb_addr_t;
typedef logic [15:0] idx_t;

`endif
